package com.github.zdongcoding.recyclerviewlib.viewholder;

import android.support.annotation.NonNull;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.github.zdg.recyclerview.ItemViewHolder;
import com.github.zdongcoding.recyclerviewlib.R;
import com.github.zdongcoding.recyclerviewlib.model.ItemTitle;

public class TitleViewHolder extends ItemViewHolder<ItemTitle> {
    private TextView mTvTitleName;

    public TitleViewHolder(@NonNull ViewGroup parent) {
        super(parent,R.layout.item_simple_title_layout);
        mTvTitleName = (TextView) itemView.findViewById(R.id.title_name);
    }
    public TitleViewHolder(@NonNull ViewGroup parent,ItemTitle itemTitle) {
        super(parent,R.layout.item_simple_title_layout);
        mTvTitleName = (TextView) itemView.findViewById(R.id.title_name);
       this.data=itemTitle;
    }
    @Override
    public void onBindData(ItemTitle item, int position) {
        mTvTitleName.setText(item.getTitleName());
    }
}
